﻿using System;
using System.Collections.Generic;
using System.IO.IsolatedStorage;
using System.Linq;
using System.Runtime.Serialization;
using System.Text;
using System.Threading.Tasks;

namespace jbgswin
{
 public   class mk
    {
     private static IsolatedStorageFile storage = IsolatedStorageFile.GetUserStoreForApplication();
   public  static string fileName = "1.txt";
     public static void savetolocal(List<dituwz> myd)
     {
         using (IsolatedStorageFileStream stream = storage.CreateFile(fileName))
         {
             //  serializer.Serialize(stream, myd);
             DataContractSerializer xc = new DataContractSerializer(typeof(List<dituwz>));
             xc.WriteObject(stream, myd);


         }
     }
     public static List<dituwz> frmlocal1()
     {
         List<dituwz> myd;
         using (IsolatedStorageFileStream stream = storage.OpenFile(fileName, System.IO.FileMode.Open))
         {
             DataContractSerializer xc = new DataContractSerializer(typeof(List<dituwz>));
             myd = (List<dituwz>)xc.ReadObject(stream);

             return myd;

         }

     }
    }
}
